﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FaceSharp.Api;
using FaceSharp.Api.Types;
using FaceSharp.MVC.Filters;

namespace FaceSharp.MVC.Areas.FacebookApp.Controllers
{
    public class AppTabController : BaseController
    {
        /// <summary>
        /// Facebook pulls content for your tab from this URL, which must be relative to your canvas page.
        /// </summary>
        /// <returns></returns>
        [FacebookGraphApiFilter(ForceLogin = false)]
        public ActionResult Index()
        {
            var signedRequest = (SignedRequest)System.Web.HttpContext.Current.Items["SignedRequest"];
            return View(signedRequest);
        }
    }
}
